/*
 * Copyright (c) 2019. ascend 版权所有禁止转载。
 */

package cn.edu.zua.demo15.entity;

import cn.edu.zua.demo15.base.BaseObject;
import cn.edu.zua.demo15.validator.FlagValidator2;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * 说明：
 *
 * @author ascend
 * 2019/1/28 16:44
 */
@Data
@Accessors(chain = true)
public class DemoEntity implements BaseObject {

    @NotBlank
    @Length(min = 2, max = 10)
    private String name;
    @Min(value = 1)
    private Integer age;
    @NotBlank
    @Email
    private String mail;
//    @FlagValidator(values = "1,2,3")
    @FlagValidator2(values = {"china", "japanese"})
    private String flag;

}
